<template>
	<div class="header">
		<header class="fixed_top" :class=" this.$store.getters.isIphoneX ? 'iphoneX' : '' ">
            <div class="bplist is_loginbtn" @click="goBackpack"><img src="../assets/images/shouyebeibao.png"></div>
            <span>{{title}}</span>
            <div class="usercenter is_loginbtn" @click="goPersonal()"><img src="../assets/images/gerenzhongxin.png"></div>
        </header>
	</div>
</template>

<script type="text/javascript">
    import { mapMutations } from "vuex"
	export default{
		name:"appHeader",
        data(){
            return {
                title:"梦想抓娃娃"
            }
        },
        methods:{
            goPersonal(){
                this.$router.push({path:'/Personal'});
            },
            goBackpack(){
                this.$router.push({path:'/Backpack'});
            },
            ...mapMutations([
                "go"
            ])
        }
	}
</script>
<style lang="less" scoped>

.fixed_top{
	position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 50px;
    text-align: center;
    background: url(../assets/images/gerenzhongxinbeijing.png) no-repeat top center;
    background-size: 100%;
    font-size: 0;
    line-height: 50px
}
.fixed_top .is_loginbtn {
    position: absolute;
    width:40px;
    top: 0;
}
.fixed_top .bplist {
    left: 5px;
}

.fixed_top .usercenter {
    right: 5px;
}
.fixed_top > div img {
    width: 25px;
    vertical-align: middle
}
.fixed_top span {
    vertical-align: middle;
    font-size: 16px;
    color: #060606;
}
.fixed_top.iphoneX {
    height: 80px;
}
.fixed_top.iphoneX .is_loginbtn{
    top: 30px;
}
.fixed_top.iphoneX span{
    line-height: 120px;
}
</style>